import Vue from 'vue'
import Router from 'vue-router'
import Layout from './components/Layout'

Vue.use(Router);

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      component: Layout,
      redirect: '/home',
      children: [
        {
          path: 'home',
          component: () => {
            return import("./views/home")
          }
        },

       /* {
          path: 'newList',
          component: () => {
            return import("./views/home/newList.vue")
          }
        }, {
          path: 'newDetail',
          component: () => {
            return import("./views/home/newDetail.vue")
          }
        }*/

      ]
    },
    /*{
      path: '/govService',
      component: Layout,
      redirect: '/govService/index',
      children: [{
        path: 'index',
        component: () => {
          return import("./views/govService/index.vue")
        }
      }, {
        path: 'guide',
        component: () => {
          return import("./views/govService/detail.vue")
        }
      }]
    },
    {
      path: '/projectApproval',
      component: Layout,
      redirect: '/projectApproval/approvalHome',
      children: [{
        path: 'approvalHome',
        component: () => {
          return import("./views/projectApproval/approvalHome")
        }
      }, {
        path: 'officeHall',
        component: () => {
          return import("./views/projectApproval/officeHall")
        }
      }, {
        path: 'guidance',
        component: () => {
          return import("./views/projectApproval/guidance")
        }
      }, {
        path: 'queryList',
        component: () => {
          return import("./views/projectApproval/queryList")
        }
      },
      {
        path: 'policyList',
        component: () => {
          return import("./views/projectApproval/policyList")
        }
      }, {
        path: 'policyDetails',
        component: () => {
          return import("./views/projectApproval/policyDetails")
        }
      }, {
        path: 'informations/',
        component: () => {
          return import("./views/projectApproval/informations")
        }
      },
      {
        path: 'explainDetail',
        component: () => {
          return import("./views/projectApproval/explainDetail")
        }
      }
      ]
    },
    {
      path: '/information',
      component: Layout,
      redirect: '/information/index',
      children: [{
        path: 'index',
        component: () => {
          return import("./views/information/index.vue")
        }
      }, {
        path: 'approval',
        component: () => {
          return import("./views/information/approval.vue")
        }
      }, {
        path: 'detail',
        component: () => {
          return import("./views/information/detail.vue")
        }
      }]
    },
    {
      path: '/agency',
      component: Layout,
      redirect: '/agency/agencyHome',
      children: [{
        path: 'agencyHome',
        component: () => {
          return import("./views/agency/agencyHome")
        }
      }, {
        path: 'agencyList',
        component: () => {
          return import("./views/agency/agencyList")
        }
      }, {
        path: 'creditList',
        component: () => {
          return import("./views/agency/creditList")
        }
      }, {
        path: 'expertList',
        component: () => {
          return import("./views/agency/expertList")
        }
      }, {
        path: 'reviewList',
        component: () => {
          return import("./views/agency/reviewList")
        }
      }, {
        path: 'policyList',
        component: () => {
          return import("./views/agency/policyList")
        }
      }, {
        path: 'download',
        component: () => {
          return import("./views/agency/download")
        }
      }]
    },
    {
      path: '/helpCenter',
      component: Layout,
      redirect: '/helpCenter/helpLayout',
      children: [
        {
          path: 'helpLayout',
          component: () => {
            return import("./views/helpCenter/helpLayout.vue")
          },
          redirect: '/helpCenter/helpLayout/index',
          children: [
            {
              path: 'index',
              component: () => {
                return import("./views/helpCenter/index.vue")
              }
            },
            {
              path: 'list',
              component: () => {
                return import("./views/helpCenter/listLayout.vue")
              },
              redirect: '/helpCenter/helpLayout/list/',
              children: [
                {
                  path: '/',
                  component: () => {
                    return import("./views/helpCenter/list.vue")
                  }
                },
                {
                  path: 'detail',
                  component: () => {
                    return import("./views/helpCenter/detail.vue")
                  }
                }

              ]
            }
          ]
        }

      ]
    },
    {
      path: '/dataService',
      component: Layout,
      redirect: '/dataService/dataHome',
      children: [
        {
          path: 'dataHome',
          component: () => {
            return import("./views/dataService/index.vue")
          }
        },
        {
          path: 'person',
          alias: 'person/list',
          component: () => {
            return import("./views/dataService/person")
          }
        }, {
          path: 'person/detail',
          component: () => {
            return import("./views/dataService/person/detail")
          }
        }, {
          path: 'company',
          alias: 'company/list',
          component: () => {
            return import("./views/dataService/company")
          }
        }, {
          path: 'company/detail',
          component: () => {
            return import("./views/dataService/company/detail")
          }
        }, {
          path: 'project',
          alias: 'project/list',
          component: () => {
            return import("./views/dataService/project")
          }
        }, {
          path: 'project/detail',
          component: () => {
            return import("./views/dataService/project/detail")
          }
        }, {
          path: 'project/conDetail',
          component: () => {
            return import("./views/dataService/project/conDetail")
          }
        }, {
          path: 'album',
          component: () => {
            return import("./views/DataService/album")
          },
          redirect: '/dataService/album/list',
          children: [{
            path: 'list',
            component: () => {
              return import("./views/dataService/album/list.vue")
            }
          }, {
            path: 'hd',
            component: () => {
              return import("./views/dataService/album/hd.vue")
            }
          }]
        },

        {
          path: 'search',
          component: () => {
            return import("./views/dataService/search/search")
          }
        }


      ]
    },*/
  ]
})
